﻿<%@ Page Title="Office" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Office.aspx.cs" Inherits="IFD2.Office" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label1" runat="server" Text="My Office:" meta:resourcekey="MyOffice"></asp:Label><br />
                <asp:Label ID="lblOffice" runat="server" Font-Bold="True"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:DetailsView ID="DetailsView1" runat="server" CellPadding="4" DataSourceID="SqlDataSource1" style="min-width:200px;" class="table-hover"
                            ForeColor="#333333" GridLines="None" Height="50px" Width="397px" AutoGenerateRows="False" DataKeyNames="id">
                            <FooterStyle BackColor="#0066CC" Font-Bold="True" ForeColor="White" />
                            <CommandRowStyle BackColor="#0066CC" Font-Bold="True" />
                            <EditRowStyle BackColor="#2461BF" />
                            <RowStyle BackColor="#EFF3FB" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
                            <HeaderStyle BackColor="#0066CC" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                            <Fields>
                                <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id"  meta:resourcekey="id" />
                                <asp:BoundField DataField="airline" HeaderText="airline" SortExpression="airline"  meta:resourcekey="airline" />
                                <asp:BoundField DataField="type" HeaderText="type" SortExpression="type"  meta:resourcekey="type" />
                                <asp:BoundField DataField="name" HeaderText="name" SortExpression="name"  meta:resourcekey="name" />
                                <asp:BoundField DataField="status" HeaderText="status" SortExpression="status"  meta:resourcekey="status" />
                                <asp:BoundField DataField="valid_date" HeaderText="valid_date" SortExpression="valid_date"  meta:resourcekey="valid_date" DataFormatString="{0:d}"/>
                                <asp:BoundField DataField="expired_date" HeaderText="expired_date" SortExpression="expired_date"  meta:resourcekey="expired_date" DataFormatString="{0:d}"/>
                                <asp:BoundField DataField="rank" HeaderText="rank" SortExpression="rank"  meta:resourcekey="rank" />
                                <asp:CheckBoxField DataField="group_book" HeaderText="group_book" SortExpression="group_book"  meta:resourcekey="group_book" />
                                <asp:BoundField DataField="default_currency" HeaderText="default_currency" SortExpression="default_currency"  meta:resourcekey="default_currency" />
                                <asp:CheckBoxField DataField="api_enabled" HeaderText="api_enabled" SortExpression="api_enabled" meta:resourcekey="api_enabled"/>
                                <asp:BoundField DataField="dcs_airport" HeaderText="dcs_airport" SortExpression="dcs_airport"  meta:resourcekey="dcs_airport" />
                                <asp:CheckBoxField DataField="check_deposit" HeaderText="check_deposit" SortExpression="check_deposit"  meta:resourcekey="check_deposit" Visible="false" />
                                <asp:TemplateField HeaderText="Deposit Balance" meta:resourcekey="deposit_balance" Visible="false">
                                    <ItemTemplate>
                                        <%# Eval("deposit_currency") +""+ Eval("deposit_balance","{0:N}")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user"  meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time"  meta:resourcekey="done_time" />
                            </Fields>
                        </asp:DetailsView>
                        <asp:HiddenField ID="KEY" runat="server" />
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_user_get_my_office_info" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <div class="btn-group">
                        <asp:Button ID="btnRoles" runat="server" cssclass="btn btn-sm btn-default" Text="Roles..." PostBackUrl="Roles.aspx"  meta:resourcekey="Roles" />
                        <asp:Button ID="btnUsers" runat="server" cssclass="btn btn-sm btn-default" Text="Users..."  meta:resourcekey="Users" OnClick="btnUsers_Click" />
                    </div>
                </div>
            </div>
        </div>
    </div>

    </div>
    </form>
</asp:Content>
